package com.example.cuckoofilterdemo.filter;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CuckooFilterService {
    private final RedisCuckooFilter cuckooFilter;

    @Autowired
    public CuckooFilterService(RedisCuckooFilter cuckooFilter) {
        this.cuckooFilter = cuckooFilter;
    }

    public boolean mightContain(String item) {
        return cuckooFilter.mightContain(item);
    }

    public boolean add(String item) {
        return cuckooFilter.add(item);
    }
}
